﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace Basic_sprite_code
{
    class MagicBar:Sprite
    {
        public Apprentice owner;

        public MagicBar(DarkLordsApprentice g, Vector2 position, Apprentice a)
            : base(g, "MagicBar", position, new Vector2(0, 0))
        {
            owner = a;
            scale = 0.6f;
        }

        public override void Update(GameTime gameTime)
        {
            position.Y = -300.0f * (1.0f - (float)(owner.currentMagic) / (float)(owner.maxMagic));
            
            base.Update(gameTime);
        }
    }
}
